package jp.kentaro.plugin.lwjgl.samples.test4.views;

import java.io.FileNotFoundException;

import jp.kentaro.plugin.lwjgl.samples.test4.views.LwjglCanvas;
import jp.kentaro.plugin.lwjgl.samples.test4.views.TextureLoader;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.opengl.GLCanvas;
import org.eclipse.swt.opengl.GLData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.util.glu.GLU;

public class ViewPart extends org.eclipse.ui.part.ViewPart {
	static Display display;
	static Shell shell;
	static GLData data;
	static GLCanvas canvas;
	static Texture m_texture;
	static int m_height, m_width;
	
	public ViewPart() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void createPartControl(Composite parent) {
		// TODO Auto-generated method stub
		LwjglCanvas lwglCanvas = new LwjglCanvas(parent, parent.getSize().x, parent.getSize().y);
		lwglCanvas.setOrtho();
		try {
			lwglCanvas.start();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

}
